<template>
    <div class="collection-block">
      <div class="block-padding">
        <div class="title">
          <h3>{{title}}</h3>
          <a href="#">更多</a>
        </div>

        <div class="list clearfix">

          <router-link
            :to="{
              name:'Player',
              params:{songid:item.song_id} }"
            class="item"
            :class="index%3 !== 1?'clear-padding':''"
            v-for="(item,index) in newData"
            :key="index"
          >
            <div class="img-warpper">
              <img :src="item.pic_big" alt="">
            </div>
            <div class="main">{{ item.title }}</div>
            <div class="gray">{{ item.author }}</div>
          </router-link>

        </div>
      </div>
    </div>
</template>

<script>
    export default {
        name: "MusicListView",
      props: ['newData','title'],
      mounted(){

      },

    }
</script>

<style lang="less" scoped>
  .collection-block {
    background-color: #f8f8f8;
    padding: 5px 0;
  }

  .block-padding {
    padding: 10px 17px;
    background-color: #fff;
  }

  .title {
    display: flex;
    margin: 14px 0 18px;
  }

  .title h3 {
    flex: 1 1 0%;
    display: block;
    font-weight: 700;
    font-size: 20px;
  }

  .list {
    width: 100%;
  }

  .list .item {
    float: left;
    width: 31.33%;
    padding: 0 10px;
    margin-bottom: 10px;
  }

  .clear-padding {
    padding: 0 !important;
  }

  .main {
    margin-top: 4px;
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .gray {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  .btn-more {
    font-size: 12px;
    text-align: right;
    color: #333;
  }
</style>
